package gregorytersoff_controller;



import gregorytersoff_boundary.DecisionlinesGUI;
import gregorytersoff_model.Model;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;





public class Easierpassing implements ActionListener{
	private int xcoord;
	private int ycoord;
	private DecisionlinesGUI gui;
	Model model;
	
	/**
	 * An implementation of actionlistener used to pass along two ints based on the JButton that created this class to indicate the position of
	 * a potential line, since those integers are obtained via a for() loop used when initializing each element in the grid of JButtons.
	 * @param x The relative position of the left of the two lines connected by the edge represented by the JButton that creates this class
	 * @param y The height of the edge represented by the JButton that creates this class
	 * @param g The DecisionlinesGUI to pass on to to the ChoiceNameController
	 * @param m The Model to pass on to to the ChoiceNameController
	 */
	public Easierpassing (int x, int y, DecisionlinesGUI g, Model m)
	{
		xcoord = x;
		ycoord = y;
		gui = g;
		model = m;
	}
	/**Runs the EdgeController with inputs not accessible had the controller been called directly by an anonymous actionlistener
	 * 
	 */
	public void actionPerformed(ActionEvent e) {
		new EdgeController(xcoord, ycoord, gui, model).process();	
	}

	
	
	
	

}
